Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

369
Visualizações
Flask CLI shows "TypeError: exceptions must derive from BaseException"

When I run Flask from the terminal with flask run, if my code has an error I see "TypeError: exceptions must derive from BaseException" instead of the actual error. To debug it I need to open the browser and inspect the exc_info variable in the Werkzeug debugger, which is not convenient. Why is Flask doing this? How can I see the actual error in the terminal?

$ FLASK_APP=example flask run

Traceback (most recent call last):
  File "[...]/lib/python3.9/site-packages/flask/cli.py", line 356, in __call__
    self._flush_bg_loading_exception()
  File "[...]/lib/python3.9/site-packages/flask/cli.py", line 344, in _flush_bg_loading_exception
    raise exc_info
TypeError: exceptions must derive from BaseException
over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

This is a bug introduced in Flask 2.0 that will be fixed when Flask 2.0.2 is released. The CLI was incorrectly re-raising sys.exc_info() instead of only the exception object. Until then, you can turn off lazy loading by running with flask run --eager-loading.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda